/etc/issue.net not displaying system information for SSH logins | 您所在的位置:网站首页 › issue net › /etc/issue.net not displaying system information for SSH logins |
Telnet
/etc/issue.net is (was) used as an “identification file for telnet sessions”. From the telnetd manual page: If the file /etc/issue.net is present, telnetd will display its contents before the login prompt of a telnet session. The contents of this file are described by the issue.net(5) manual page: The file /etc/issue.net is a text file which contains a message or system identification to be printed before the login prompt of a telnet session. It may contain various %-char (or, alternatively, \-char) sequences. Note: its escape sequences are similar to – but not the same as – those supported by issue.net, e.g., \d and \t do the same thing: both print the time and date. SSHThe OpenSSH server does not display the contents of issue or issue.net. However, it can be configured to send a pre-login banner (before the password prompt), similar to the Telnet server. The OpenSSH server Banner configuration option is described in the sshd_config(5) manual page as: The contents of the specified file are sent to the remote user before authentication is allowed. I’m guessing you included the following line in your SSH server configuration: Banner /etc/issue.netHowever, sshd does not interpret any of the issue.net escape sequences and the SSH banner file should contain only “static” text (i.e., no special escape sequences). Alternative solutionYou can provide dynamic system information to users after they’ve logged in by using the update-motd package which modifies the message of the day. I haven’t done this myself but the following resources should help you: UpdateMotd - Ubuntu Wiki Ubuntu Manpage: pam_motd - Display the motd file Ubuntu Manpage: update-motd - dynamic MOTD generation |
CopyRight 2018-2019 实验室设备网 版权所有 |